import { Component } from '@angular/core';
import { Platform , AlertController} from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { TabsPage } from '../pages/tabs/tabs';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage:any = TabsPage;
  public menuList = [];

  constructor(
    platform: Platform, 
    statusBar: StatusBar, 
    splashScreen: SplashScreen,
    public alertCtrl: AlertController,
  ) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();
     
    });
    this.initList();
  }
  openPage(e){
    let alert = this.alertCtrl.create({
          title:"页面跳转",
          subTitle: e+",你想跳那个页面？",
          buttons:["ok"]      
    })
    alert.present();

  }
  initList(){
    for(var i=0;i<5;i++){ 
      var _i = i+1
      this.menuList.push("功能"+_i)
    }
  }
}
